CREATE TRIGGER TGNCC_01 ON NHACUNGCAP
INSTEAD OF DELETE
AS
BEGIN
	DECLARE @MANCC VARCHAR(15)
	SET @MANCC = (SELECT MANHACUNGCAP FROM deleted)
	DELETE FROM Sach WHERE NhaCungCap = @MANCC
	DELETE FROM NhaCungCap WHERE MaNhaCungCap = @MANCC
	RAISERROR('XOA NHA CUNG CAP THANH CONG',16,1)
END